//====================使用rem布局==============
(function(){
    function w() {
        var r = document.documentElement;
        var a = r.getBoundingClientRect().width;
        if (a > 750 ){
            a = 750;
        }
        var rem = a / 7.5;
        r.style.fontSize = rem + "px"
    }
    var t;
    w();
    window.addEventListener("resize", function() {
        clearTimeout(t);
        t = setTimeout(w, 300)
    }, false);
})();
//生成图表
var ThisChart = {
    json:{
        exporting:{
            enabled:false
        },
        credits: {
            enabled: false
        },
        title: {
            text: ''
        },
        xAxis: {
            categories: [],
            labels: {
                enabled: true
            }
        },
        yAxis: {
            title: {
                text: ''
            },
            plotLines: [{
                value: 0,
                width: 1,
                color: '#808080'
            }]
        },
        legend: {
            enabled: false
        },
        series: [{
            name: '收入',
            data: []
        }]
    },
    createCharts : function(json) {
        var chart = new Highcharts.Chart('container', json);
    }
}

setTimeout(()=>{
    var arrTime = ['01月','02月','03月','04月','05月','06月','07月'];
    var arrCount = [110,344,330,440,110,30,550];

    //加载图表
    ThisChart.json.xAxis.categories = arrTime;
    ThisChart.json.series[0]['data'] = arrCount;
    var chart = new Highcharts.Chart('container',ThisChart.json);
})